/**
 * 
 */
package com.linkage.lcims.base.dao.cdma.impl;

import com.linkage.lcims.base.dao.HibernateBaseDAOImpl;
import com.linkage.lcims.base.dao.cdma.interfaces.OnlineDAO;
import com.linkage.util.exception.DAOException;
import com.linkage.util.service.Hash163;

/**
 * 
 * 
 */
public class OnlineDAOImpl extends HibernateBaseDAOImpl implements OnlineDAO {

	private static final String tablePrefix="C_ONLINE";
	
	public int deletePdsnOnlineByImsi(String imsi) throws DAOException {
		try{
			String tableName=tablePrefix+Hash163.sHash(imsi);
			String delSql="delete "+tableName;
			String where=" where imsi ='"+imsi+"'";
			return this.delete(delSql+where);
		}catch(Exception e){
			throw new DAOException(e,this.getClass());
		}
	}

}
